home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / sortx100.zip / sortx.doc < prev    next >
Text File  |  1994-03-11  |  5KB  |  104 lines

  1. 3/10/94               SORTX 1.0
  2.                       =========
  3.  
  4.                  by Warren S. Macchi
  5.                   macchi@cs.ucf.edu
  6.  
  7.    SORTX is an enhancement to the sort program distributed
  8. with DOS operating systems. It has the same functions as
  9. the normal sort, plus some additional capabilities.
  10.  
  11.    This document has two sections. The first part introduces
  12. the operation of the DOS sort program in a simple and short
  13. manner. The second part details the characteristics of the
  14. SORTX program, which is an enhancement of the DOS version.
  15. If you are familiar with the operations of the DOS sort
  16. version, you may want to skip part one.
  17.  
  18. PART 1:
  19. ------
  20.    The sort distributed with DOS (2.0 and up) is a simple
  21. to use sorting program that reads ASCII character lines
  22. from the standard input, sorts the lines in increasing or
  23. decreasing order, and outputs the sorted lines to the
  24. standard output. The lines are sorted without regard to
  25. upper or lower case letters. In addition, lines can be
  26. sorted beginning at a particular column specified in the
  27. command line.
  28.  
  29.    The following explanations assume that you have a path
  30. to the DOS files directory, or that you are in the directory
  31. that contains these files.
  32.  
  33.    A sample use of the DOS sort program is:
  34.  
  35.          sort /+8 <unsorted.doc >sorted.doc
  36.  
  37. where the input is taken from the "unsorted.doc" file, the output
  38. goes to the file "sorted.doc", and the sorting is accomplished
  39. starting at column 8 (specified by the /+8 switch). A reverse
  40. sort can easily be done by including the /r switch.
  41.  
  42.    As you can see, sorting of text lines is an easy task. Some
  43. uses of this program are encountered while programming in
  44. high level languages like BASIC, C, or PASCAL. The program
  45. invokes a shell to the DOS operating system with the name of
  46. the file to be sorted in place of "unsorted.doc," and the output
  47. filename in place of "sorted.doc." Typical users of the sort
  48. program are addresses, dictionaries, and other databases.
  49.  
  50.    You can see how sort works by just typing "sort"+ENTER. The
  51. program is now waiting for input from standard in, which is the
  52. keyboard. Just type in some lines with names or other data, then
  53. press the F6 function key (or CTRL-Z) plus ENTER, and the
  54. input is displayed in sorted order. That easy!!
  55.  
  56. PART 2:
  57. ------
  58.    The DOS version of sort has some rather limited capabilities.
  59. Input data is restricted to no more than 64K, and line lengths are
  60. restricted to about 130 characters. This means that a database with
  61. data above these limits will not be accepted by the DOS sort. In
  62. addition, a file with many lines may take a long time to sort.
  63.  
  64.    SORTX 1.0 comes to the rescue by increasing the number of lines
  65. accepted to 15000, line lengths of up to 2000 characters, a fast
  66. sorting algorithm, and less memory requirements for small files.
  67. Input data is only restricted by available conventional memory and
  68. the line lengths and number of lines limits specified above.
  69.  
  70.    SORTX has the same command line structure as the regular
  71. sort version, plus some more. The following is a list of them:
  72.  
  73.     /h or /?  displays a list of available switches and current
  74.               configuration
  75.     /r        produces a reverse sorting order
  76.     /p        gives input data statistics after processing
  77.     /-        inhibits display of sorted data
  78.     /+nn      sorts data starting at column "nn"
  79.  
  80.    The /p and /- options are useful when only an idea of the size
  81. and characteristics of the input file is needed. It is also useful
  82. for giving an idea of the time required to process a particular file,
  83. without displaying it. You can rename SORTX.EXE to SORT.EXE, so that
  84. programs that look for SORT.EXE can use the advanced capabilities of
  85. SORTX.
  86.  
  87.    Running on a 286-16Mhz machine, SORTX can sort 15000 lines of data
  88. in about 22 seconds! This is achieved by the use of a fast split
  89. and merge algorithm. If you are interested in getting a copy of the
  90. source file (for C++), you can ask me to e-mail it, or mail it to you,
  91. at the e-mail address below.
  92.  
  93.    Hopefully you will appreciate the improvements that SORTX gives
  94. to the sorting of data. If this is the case, or if you have ideas
  95. for new features that you would like it to have, you can contact me
  96. at the e-mail address listed at the top of this file.
  97.  
  98.    SORTX is freely distributable, but please include all the files
  99. with it (SORTX.EXE and SORTX.DOC).
  100.  
  101.    Thank you for using SORTX!!
  102.  
  103.  
  104.